package mx.itesm.wakapanda;

import org.cocos2d.actions.base.CCRepeatForever;
import org.cocos2d.actions.interval.CCAnimate;
import org.cocos2d.actions.interval.CCIntervalAction;
import org.cocos2d.nodes.CCAnimation;
import org.cocos2d.nodes.CCSprite;

public class Pook{

	CCSprite pook;
	
	CCAnimation animacion;
	CCIntervalAction correr;
	
	public Pook() {

		pook = CCSprite.sprite("pook1.png");
		
		pook.setPosition(200, 150);
		
		animacion = CCAnimation.animation("correr");


		animacion.addFrame("pook1.png");
		animacion.addFrame("pook2.png");
		animacion.addFrame("pook3.png");
		animacion.addFrame("pook4.png");
		animacion.addFrame("pook5.png");
		animacion.addFrame("pook6.png");
		animacion.addFrame("pook7.png");
		animacion.addFrame("pook8.png");
		
		
		correr = CCAnimate.action(.8f, animacion, true);
		
		pook.runAction(CCRepeatForever.action(correr));
		
		
		
		
	}
	
	public CCSprite getPook() {
		return pook;
	}

	public void setPook(CCSprite pook) {
		this.pook = pook;
	}
}
